package com.example.testproject.bean

import com.chad.library.adapter.base.entity.MultiItemEntity
import com.example.testproject.adapter.TopicAdapter
import com.example.testproject.adapter.TopicContentAdapter
import java.io.Serializable

/**
 *
 * @ClassName: TopicBean
 * @Author: android 超级兵
 * @CreateDate: 10/27/21$ 7:14 PM$
 * TODO
 */

// recyclerView布局
data class TopicSecondBean(
    val type: Int, // 题目类型
    val title: String,// 标题
    val seq: Int, // 题号
    val child: List<ContentBean>
) : MultiItemEntity, Serializable {
    data class ContentBean(
        var ContentTitle: String,// 题目内容
        var isSelect: Boolean = false,// 是否选中[如果是填空题,输入内容则表示选中]
        val typeLayout: Int = TopicContentAdapter.TEXT // 默认text布局
    ) : MultiItemEntity, Serializable {
        override fun getItemType(): Int = typeLayout
    }

    override fun getItemType(): Int = TopicAdapter.RECYCLER_VIEW
}

// text布局
data class TopicFirstBean(val title: String) : MultiItemEntity, Serializable {
    override fun getItemType(): Int = TopicAdapter.TEXT
}

data class TopicDetailsBean(
    val type: Int,  // 类型
    val child: List<TopicSecondBean>    // 题
)

